﻿using System;
using fastCSharp;

namespace diantou.web.ajax.admin
{
    /// <summary>
    /// 问题测试数据调用
    /// </summary>
    [fastCSharp.code.cSharp.ajax(IsPool = true)]
    class problemTestData : permissionHandle<problemTestData>
    {
        /// <summary>
        /// 获取测试数据
        /// </summary>
        /// <param name="problemId"></param>
        /// <param name="testId"></param>
        /// <returns></returns>
        public diantou.dataModel.problemTestData Get(int problemId, int testId)
        {
            return diantou.dataAccess.tcpCall.problemTestData.get(problemId, testId, currentUser.Id);
        }
        /// <summary>
        /// 添加测试数据
        /// </summary>
        /// <param name="value"></param>
        /// <param name="onReturn"></param>
        [fastCSharp.code.cSharp.ajax(MaxPostDataSize = 10)]
        public void Append(diantou.dataAccess.problemTestData value, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            diantou.dataAccess.tcpCall.problemTestData.append(value, currentUser.Id, onReturn);
        }
        /// <summary>
        /// 修改测试数据
        /// </summary>
        /// <param name="value"></param>
        /// <param name="onReturn"></param>
        [fastCSharp.code.cSharp.ajax(MaxPostDataSize = 10)]
        public void Rework(diantou.dataAccess.problemTestData value, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            diantou.dataAccess.tcpCall.problemTestData.rework(value, currentUser.Id, onReturn);
        }
        /// <summary>
        /// 删除测试数据
        /// </summary>
        /// <param name="problemId"></param>
        /// <param name="testId"></param>
        /// <param name="onReturn"></param>
        public void Delete(int problemId, int testId, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            diantou.dataAccess.tcpCall.problemTestData.Delete(problemId, testId, currentUser.Id, onReturn);
        }
    }
}
